package edu.sctu.zcy.month201505.day20150513;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by user24 on 2015/5/13.
 */
public class SubClassTwo extends Parent {

    Person[] persons;

    public SubClassTwo(Person[] person){
        super("学生信息2：");
        this.persons = person;
    }


    @Override
    public List<Person> printOne() {

        List<Person> persons1 = new ArrayList();

        for (int i = 0; i < persons.length; i++) {

            if(persons[i].getScore() >= 60 && persons[i].getSex().equals("女")){
                persons1.add(persons[i]);

            }
        }
        return persons1;
    }
}
